<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>后盾人</title>
  </head>
  <body></body>
  <script>
    let hd = { name: "hd" };
    let parent = {
      name: "parent",
      show() {
        console.log("parent method:" + this.name);
      }
    };
    // console.log(hd.__proto__ == Object.prototype);
    Object.setPrototypeOf(hd, parent);
    // hd.show();
    // parent.show();
    console.log(Object.getPrototypeOf(hd));
  </script>
</html>
